package oo.day03;

public class RefArrayDemo {
    public static void main(String[] args) {
        Student[] stus = new Student[3];
        stus[0] = new Student("zhangsan",25,"Lf");
        stus[1] = new Student("lisi",24,"Jms");
        stus[2] = new Student("wangwu",26,"Sd");
        System.out.println(stus[0].name);
        stus[1].age=28;
        stus[2].sayHi();
        for (int i=0;i<stus.length;i++){
            System.out.println(stus[i].name);
            stus[i].sayHi();
        }
        

    }
}
